package  
{
	import flash.display.Sprite;
	import iscript.uiFramework.components.button.BaseButton;
	import iscript.uiFramework.components.message.Message;
	import iscript.uiFramework.components.message.MessageButtonType;
	import iscript.uiFramework.components.message.MessageType;
	public class ButtonUITest extends  Sprite
	{
		
		public function ButtonUITest() 
		{
			
			var  b:BaseButton = new BaseButton()
			b.text = "YES";
			b.render(this)
			b.width = 200;
			b.height = 100;			
			b.ClickHandler= clickButton
			
		}
		
		private function clickButton(e:BaseButton):void 
		{
			//e.enabled = false;
			trace("click")
			addMessage();
		}
		
		private function addMessage():void
		{
			var msg:Message = new Message();
 
				msg.type = MessageType.INFO;
				msg.messageButtonConfig.type = MessageButtonType.YESNO
				msg.messageButtonConfig.YesButtonText ="确定"
				msg.messageButtonConfig.YesButtonHandler = function(e:BaseButton):void
				{
					trace(msg.text);
				}
				msg.title.text = "标签"
				msg.title.font = "微软雅黑"
				//msg.theme="GrayTheme"
				msg.text = "Are you sure you want to do that? 中文字符测试。"
				msg.scaleX = 2;
				msg.scaleY = 2;
				msg.render(this);
                

		}
		
	}

}